Silk Road forums

Support => Technical support => Topic started by: Coherence on December 11, 2011, 12:08 am

Title: Mismatch between BTC value of postage options and USD value
Post by: Coherence on December 11, 2011, 12:08 am
Hello,

Here's what I think is a bug. How to reproduce:
a) click on add listing
b) select your category
c) Postage options -> click "load defaults"

Mine are normally set to Worldwide (free) and Worldwide w/tracking (around 3 BTC.) When I click on the click, the price fetched for the second option is around 10 BTC. I think this is the USD value.

Relevant profile settings:
* peg listings to US Dollar (recommended)
* hedge escrow (recommended)
* post-commission pricing

I'd appreciate this being fixed, as I now have no confidence in the system giving me the right price for the postage options if I change this erratic value (i.e. if I bring it back to 3 BTC, will it store it as 3 USD instead?) If an admin needs to have a look at my account in the DB, I'm #33046.

Thanks a lot!
Title: Re: Mismatch between BTC value of postage options and USD value
Post by: Variety Jones on December 11, 2011, 12:44 am
Re-save your postage defaults.

First off, make sure your settings are in the same currency as you are trying to set the postage in. If your settings display prices in dollars, your postage will be in dollar amounts.

Open a new tab and go to your accounts page http://silkroadvb5piz3r.onion/index.php/account

Click on add listing.

Enter a name and a price for each postage option you offer.

Click on set as default.

When the page reloads, close the tab.

Now try adding an item and loading the default postage options.
Title: Re: Mismatch between BTC value of postage options and USD value
Post by: Coherence on December 11, 2011, 01:00 am
Thanks for your reply.

Quote
First off, make sure your settings are in the same currency as you are trying to set the postage in. If your settings display prices in dollars, your postage will be in dollar amounts.
My settings are in BTC.

Quote
Open a new tab and go to your accounts page http://silkroadvb5piz3r.onion/index.php/account

Click on add listing.

Enter a name and a price for each postage option you offer.

Actually, the defaults settings, with the wrong prices, are already there. So I delete them, and set them as they should be: I enter 3 BTC. Guess what appears? "Worldwide w/ tracking (฿9.06) remove"

Quote
Click on set as default.
I've given it a try, it couldn't get much worse:

Quote
When the page reloads, close the tab.

Now try adding an item and loading the default postage options.

And the wrong price is still there!

Can I know what's stored in the DB about the postage options, how it's stored, and the piece of code that supposed to be changing that? I'll find my way in it.
Title: Re: Mismatch between BTC value of postage options and USD value
Post by: Variety Jones on December 11, 2011, 02:36 am
I changed my setting to show prices in bitcoin and replicated your problem.

I see where the problem lies.

When you are set to view in bitcoins, adding postage apparently converts it to dollars, and stores that number, fucking things up - you enter 1, it comes back with 3.03 when the page reloads.

For a temporary fix until admin has a chance to look at it, just change your setting to dollars, and enter a dollar amount for the charge, and it will properly save the amount. When your done you can change back to bitcoin display, it won't affect the postage settings once they are saved. It works fine for me, but I display in dollars on my account.

Postage is still displayed in bitcoins at checkout, as is the item itself, regardless of the customers display settings.
Title: Re: Mismatch between BTC value of postage options and USD value
Post by: Coherence on December 11, 2011, 12:37 pm
Thanks for the workaround, it works.